#include"../source/server.hpp"
int main()
{
    //测试正常处理请求
    std::unique_ptr<Socket> client(new Socket);
    std::string req="get /hello HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    client->CreateClient(8888,"127.0.0.1");
    while(1)
    {
        assert(client->Send(req.c_str(),req.size())!=-1);
        char buffer[1024]={0};
        if(client->Recv(buffer,1023)==-1)
            break;
        DEBUG_LOG("[%s]",buffer);
        sleep(3);
    }
    client->Close();
}